<?php
//模拟秒杀情况
require './fileCache.php';
$S1=new FileCache();


$check=$S1->getHasLock("abc");
if ($check==0){
    die();
}else{
    if(!$check && $check!=0){
    $S1->setHasLock('abc',100);
    }
    $S1->setHasLock('abc',$check-1);
}